<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.console.servlets.trading.CjjlList"%>
<%@page import="com.blockchain.console.service.trading.entity.CjjlEntity"%>
<%@page import="com.blockchain.console.service.trading.entity.JyfqEntity"%>
<%@page import="com.blockchain.common.enums.EntrustType"%>
<%@page import="com.blockchain.common.enums.JyztStatus"%>
<%@page import="com.blockchain.console.servlets.trading.WtList"%>
<%@page import="com.blockchain.console.service.trading.entity.JyglEntity"%>
<%@page import="com.sun.org.apache.bcel.internal.generic.ISUB"%>
<html>
<head>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%
CURRENT_CATEGORY="JYGL";
CURRENT_SUB_CATEGORY="CJJLLIST";
PagingResult<CjjlEntity> cjjls= (PagingResult<CjjlEntity>)request.getAttribute("cjjls");
CjjlEntity[] cjjlsArray = cjjls.getItems();
JyfqEntity[] jyfqs=(JyfqEntity[])request.getAttribute("jyfqs");
%>
<body>
	<%@include file="/WEB-INF/include/header.jsp"%>
	<div class="w_main">
		<div class="main clearfix">
			<div class="wrap">
			<form action="<%=controller.getURI(request, CjjlList.class) %>" method="post">
				<div class="r_main">
					<div class="home_main">
						<div class="box box1 mb15">
							<div class="atil">
                    		<h3>成交记录</h3>
                  			</div>
                  		<div class="con">
						<div class="clear"></div>
						<ul class="yhxq_li">
							<li>总计：<span class="blue"><%=cjjls.getItemCount()%></span>笔</li>
						</ul>
						<div class="clear"></div>
						</div>
						</div>
						<div class="box box1 mb15">
							<div class="clear"></div>
							<div class="con">
							<div class="admin_input admin_pb">
                                <p>买家：<input type="text" name="buyer" value="<%StringHelper.filterHTML(out, request.getParameter("buyer"));%>" class="yhgl_input" /></p>
                                <p>卖家：<input type="text" name="seller" value="<%StringHelper.filterHTML(out, request.getParameter("seller"));%>" class="yhgl_input" /></p>
                       	    	<p>时间：<input type="text" name="start" readonly="readonly" id="datepicker1" class="yhgl_input date" />
                                <span class="pr10">至</span><input readonly="readonly" type="text" name="end" id="datepicker2" class="yhgl_input date" /></p>
                                <p>交易市场：
                                	<select name="id" class="yhgl_sel">
                                  	<option value="">请选择</option>
                                  	<%
                                  		for (JyfqEntity j:jyfqs ) {
                                  	%>
									<option value="<%=j.id%>" <%if (j.id==IntegerParser.parse(request.getParameter("id"))) {%> selected="selected" <%}%>>
									 <%StringHelper.filterHTML(out, j.zwm_s);%>(<%StringHelper.filterHTML(out, j.ywm_s);%>)/
                          			<%StringHelper.filterHTML(out, j.zwm_m);%>(<%StringHelper.filterHTML(out, j.ywm_m);%>)
									</option>
									<%
										}
									%>                                
                                  </select>
                                </p>
                                 <p>委托类型：
                                	<select name="jylx" class="yhgl_sel">
                                	    <option value="">请选择</option>
	                                  	<%
	                                  		for (JyztStatus is : JyztStatus.values()) {
	                                  	%>
											<option value="<%=is.name()%>" <%if (is.name().equals(request.getParameter("jylx"))) {%> selected="selected" <%}%>><%=is.getName()%></option>
										<%
											}
										%>
                                  </select>
                                  </p>		
						 		<div class="mt10">
						 			<input name="" type="submit" class="btn2 mr10" value="搜索" />
						 			<div class="clear"></div>
								</div>
						    </div>
						</div>
						</div>
						<div>
							<table width="100%" border="0" cellspacing="0" cellpadding="3" class="yhgl_table tc">
						<tr class="hsbg">
                          <td>ID</td>
                          <td>买家</td>
                          <td>卖家</td>
                          <td>市场/简称</td>
                          <td>单价(元)</td>
                          <td>数量</td>
                          <td>总额</td>
                          <td>买家手续费</td>
                          <td>卖家手续费</td>
                          <td>类型</td>
                          <td>时间</td>
                        </tr>
						<%
                        if (cjjlsArray != null) {for (int i =0;i<cjjlsArray.length;i++){CjjlEntity c=cjjlsArray[i];if (c == null) {continue;}
                        %>
                        <tr class="dhsbg">
                          <td><%=c.id%></td>
                          <td><%StringHelper.filterHTML(out, c.buyer);%></td>
                          <td><%StringHelper.filterHTML(out, c.seller);%></td>
                          <td>
                   		  <%StringHelper.filterHTML(out, c.zwm_s);%>(<%StringHelper.filterHTML(out, c.ywm_s);%>)/
                          <%StringHelper.filterHTML(out, c.zwm_m);%>(<%StringHelper.filterHTML(out, c.ywm_m);%>)
                          </td>
                          <td><%=Formater.formatAmount_6(c.dj) %></td>
                          <td><%=Formater.formatAmount_6(c.sl) %></td>
                          <td><%=Formater.formatAmount(c.ze) %></td>
                          <td><%=Formater.formatAmount(c.buyer_sxf) %></td>
                          <td><%=Formater.formatAmount(c.seller_sxf) %></td>
                          <td><%if(c.jyztStatus!=null){%><%=c.jyztStatus.getName()%><%}%></td>
                          <td><%=TimestampParser.format(c.sj)%></td>
						</tr>
						<%}}%>
							</table>
						</div>
							<%AbstractConsoleServlet.rendPagingResult(out, cjjls); %>
						<div class="box2 clearfix"></div>
					</div>
				</div>
				</form>
			</div>
			<%@include file="/WEB-INF/include/left.jsp" %>
		</div>
	</div>
	<%@include file="/WEB-INF/include/footer.jsp"%>
	<%@include file="/WEB-INF/include/script.jsp"%>
	<%@include file="/WEB-INF/include/datepicker.jsp"%>
	<script type="text/javascript">
		$(function() {
			$("#datepicker1").datepicker({inline: true});
		    $('#datepicker1').datepicker('option', {dateFormat:'yy-mm-dd'});
		    $("#datepicker2").datepicker({inline: true});
		    $('#datepicker2').datepicker('option', {dateFormat:'yy-mm-dd'});
		    $("#datepicker1").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("start"));%>");
		    $("#datepicker2").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("end"));%>");
		});
		</script>
</body>
</html>